import { TableColumnObject } from 'amis/lib/renderers/Table'
import serverColumnUtils, { ServerColumnUtilsProps } from '@/components/amis/ServerColumnUtils/serverColumnUtils'
import smsSupplierAdminService from '@/core/sms/generated/service/admin/smsSupplierAdminService'

class SmsSupplierIdColumnUtils {
	getSchema = (parmas?: Partial<ServerColumnUtilsProps>): TableColumnObject => {
		return serverColumnUtils.getSchema(
			Object.assign(
				{
					name: 'smsSupplierId',
					label: '短信供应商',
					valueField: 'id',
					labelField: 'title',
					getByIdsWithDebounce: smsSupplierAdminService.getByIdsWithDebounce,
				},
				parmas,
			),
		)
	}
}

export default new SmsSupplierIdColumnUtils()
